0x6A388: Setting up party's stuff for battle? (status effect bubbles, etc...)

0x6A9A0: Branch to one of nine subroutines dependent on input byte
	-Can, for instance, do start-of-turn calcs
	-Reads byte at OtherMem+$573A to determine what to do
	$00:
		-Load OtherMem+$59CC; branch to $76A64 (Ambush/Preemptive message handling)
		-If returned 0x0, jump to end; if returned 0x01 (message timer active):
			-Store 0x01 to $573A
	$01:
		-Load OtherMem+$5978 (contains battleMem pointer), branch to $079D34 (calc turn order)
		-Load OtherMem+$59CC; branch to $76B08; if >= 1 PC can act, store 0x02; else store 0x03
	$02:
		-Load OtherMem+$59CC; branch to $77BD8
		-If 0x0 returned, jump to end
	$05: Default?

	At end, routines merge; load OtherMem+$5978 (BattleMem pointer) and branch to $796C4

0x6ED50
0x6EDD2: Part of routine pertaining to status effects;
	If status is Mute or any combo of smaller statuses, branch to different routines depending on what ailment unit has?
	wow, has pointers for all possible combos of ailments...
	-Part of printing PCs' names or status names

$06FB7C - In-Batle: Root Player/Monster text update
	-Depending on value of input, either updates monsters' name/number text,
	or PCs' HP/status texts, or MP values
	0x00 For PC HP, 0x0F for monsters, 0x14 for PC MP
	Run during a combat round

$06FF20 - Called after each action in combat, and at start of combat round
	-Counts number of living monsters in each monster group/species
	-Calls $6FB7C to update monster listing

$06FFBC - Also called after each action in combat
	-Given Unit ID (can be PC or monster), load current HP and status HW
	-Checks if the unit has nonzero HP and can act (not KO/Sleep/Stun/Stone)

$070028 - Called whenever a PC's sprite may need to be redrawn
	-Determines which sprite to draw, depending on chosen action/HP critical/status effects

$070128 - Same as the above..? Calls a different subroutine at the end...
	-Instead of graphical stuff, writes a byte to charData+$44

$070214 - For a given unit, checks if it can be targeted:
	-Not 0HP/KO/Stone
	-If monster, first checks that Monster ID != 0xFF

$07028C - Called when printing damage numbers on a unit?
	-If killed or stoned, zeroes out a bunch of bytes
		-If PC, also branch to 0x728CC to remove palette tint effects
	-If asleep or stunned, negates planned action (stores 0xFF to 'action halfword')
	-If silenced:
		-Check action taken:
		-If PC casting (0x01), cancel and redraw sprite
		-If monster casting (0x08), cancel if spell ID <= 0x40

(animations,sprites, gfx-related routines here)

0x71B94: Short routine that pushes no registers; called when a unit is targeted by something?
	Load BattleMem+$287C animations pointer, copy some values around
	-Copy some small gfx ID from +$2876 to +$4B95

0x71BE4: Routine called after miss/damage numbers animating; clears them from screen

0x71C8C: Routine called upon battle victory; for printing messages with numbers attached
	r0 = BattleMem pointer
	r1 = Pointer to stack before pushing; contains text ("Earned ", "Obtained ", "HP increased by " etc)
	r2 = Number to append
	Copies text encoding of "0123456789" to stack from ROM;
	Copies eight bytes of 0xFF to stack+$18;
	Determines length of text string from r1 (minus 00 terminator)
	Branch to $15838 (convert number to decimal, digits stored as bytes in stack)

	Now, reads these digits from the stack top-down; for each digit, load up the text encoding for that number
	from the stack, and add to the text string to be printed
	Then, store an 0x0 at the end of the extended string
	

0x71EC8: Stats setting for party members; run for each member before each combat action
  0x71F54: After storing final stats/defence/attack/hit/evade, find elemental resists of equipment
	Add temporary boosts to stats, temp element resists to resists (bic with Dispel field),etc
		-Note, Dispel overrides temporary resistances!

	Then determine number of hits; divide Hit Rate by 32 and add 1
	Then determine if Max HP/MP + boosts break caps and if so reset them
	Crit rate...if unarmed and not Monk/Master, crit = 0
	Finally set 'status effect on attack' byte to zero
	

0x720F0: Stats stuff for monsters. Evasion, Defence, status stuff, elemental stuff, temp boosts,etc
	Called for all 9 monsters; recalcing monster stats before each action

0x72174: ? Called only in two spots, both within big routine at $026250

0x72220: Called twice at start of battle...sets up GFX stuff? Does LZ77 decompression...

0x725D4: Tiny subroutine: Load pointer to BattleMem+$535C
0x725E0: Small subroutine: Given PC's unit ID in r1, get pointer to that unit's permanent data

0x726FC: Hardcoded checks for certain encounter IDs
	-Used for music, Luck generation
	-Also for certain spell animation modes
	-Constantly called as part of a routine checking for dead monsters
		Return Values:
			$0: ID = 0x7B (Chaos)
			$1: ID = 0x75,78 (Kraken-2, Kraken battles)
			$2: ID = 0x73,7A (Lich-2, Lich battles)
			$3: ID = 0x74,79 (Marilith-2, Marilith battles)
			$4: ID = 0x76,77 (Tiamat-2,Tiamat battles)
			$5: ID = 0x7C,0x7D,0x7F (Miniboss battles)
			$6: Everything Else
			$7: 0xFF < ID < 0x111 (Soul of Chaos boss battles)

$0729D8: Appends a text string to a pre-existing string; called during victory messages
	-Works similarly to the number-appending routine, but of course is much shorter
	Given some offset in stack, finds length of text string stored therein (may be 0-length)
	r1 = offset of string in ROM to copy
	-Advance to the end of that string, and copy the ROM string over

$072A04: Called when a PC is about to be selected for action
	r1 = Unit ID
	Checks if the PC is already in his advanced X-location (and so doesn't need to move left)

0x72B18 - Something to do with PC battle data - check if dead?
	-If PC is alive and sprite is not 0xFF, do some sprite animation

0x72B78 - Run for every PC when sprites change?
	-Store r2 to PC's battle data +$44
	-So, sets that PC's sprite

0x72B90: Check if given unit (ID in r1) has a certain set of status effects (in r2)
	-If not, return 0x1; if it does return 0x0

0x72BE0: Live monster check; return 0x00 if Monster ID=0xFF, or if Dead/Stone/0HP
	Else return 0x1

0x72C24: Called continually when for character who's acting, and also for PC 1 after every action,
	and whole party at end of round
	-Checks if the given PC is alive, full stop

0x72C60: Called when monster(s) are dying; general bookkeeping
	stores 0x01 to given monster's entry in $51CD listing, and 0x0 in their 'death anim frame counter'
	Also sets Death status, zeroes out HP in battle data just in case
	Then branches to 71828 to clear out any status ailment indicators

0x72CDC: Called after a PC has used an item, to deplete one use
	-If it was an item and not a piece of equipment, reduce its quantity in inventory by one

0x72D18: Called at beginning of round; resets PC item use structs

0x72D6C: When a character is up for selection, clear their item use struct

$072F20 - Unused?
	-Given an item ID and type, load associated spell (armor/weap use normal data table, items use their dedicated table)
	-Load this spell's targeting byte if possible; else return 0xFF

$072FA4 - Loads a weapon/armor/item's cast spell byte, given type/ID
$072FF8 - Loads a weapon/armor/item's cast spell byte, given inventory position (UNUSED)

$075534 - Runs continually during battle;
	-Stores all PCs' X/Y coords to +$450 struct
	-For all monsters, calls $75794 (run dying anim calcs, if needed)
	-So, updates basic graphical data for all units

0x7672C - Initializing a character's battle stats; transfers party stats, calculates evade, etc
	-Handles coordinates too...and sprite drawing

0x76A04 - Unused? No pointers to this found
	-Gets first monster's VRAM data pointer; goes there + r1*32
	-Loads 0x0822378C + r2*16 into r5
	-ANDS three consecutive halfwords at this VRAM with hws from r5
	-Then, loads next halfword in 22378C region to AND with the next three VRAM hws
	-Repeat eight times total


0x76B08 - Run at the start of every turn (before first PC is selected); called only by $6A9A0
	-Handles status bubble redrawing, monster name reprinting, all sorts of stuff
	0x76BD4: Different stuff goes on here
	If battle is an Ambush (and this is the first turn?), skip some calcs for PCs:
		-For each PC that can act, increment a memory counter
	-If at least one PC can act:
		-Set first PC as the active unit
		-Load BattleMem+$4B8C byte; multiply by 72; add to BattleMem+$493; store 0x01 there
		-Return 0x01
	-If no PCs can act (or it's an Ambush), store 0x00 there instead and return 0x00
	(if 0x01 was returned, store 0x02 to BattleMem+$573A; else store 0x03)

0x76CAC - Routine handling changes when new active PC unit is selected
	-Does different things in sequence, but exits after each one to give time
	-Redraws monster names, handles PC's animation/movement,etc
	-When it returns 0x01, active PC handling is all done
	
0x779B4 - Run by targeting-related routines
	-Display targeting arrow(s), highlight names of targeted enemies

0x77F6C - Big routine with branching, for handling battle victory
	-Putting together and displaying battle victory messages
	-Handing out XP
	-And more!
	-Branch depending on BattleMem+$51DE (Call it "Routine Index")
	$00: Do some basic stuff; then set every live PC to start their celebration animation
		(also queue up victory message?)
		-Store list of living PC IDs to stack
		-Check if this encounter was a Soul of Chaos boss; if so, skip following:
			-Load total amount of XP for this encounter, divide by number of living PCs
			-Store back to memory (ie BattleMem+$5356)
			-If total XP is zero, set it to one instead
			-Give this XP to every living PC
		-Store 0x1E to some variable memory region +$36 - will act as a timer
		-Set Routine Index to 1
	$01: Decrement timer at SomeMem+$36; if not zero, exit; else:
		-Set Routine Index to 2
		-If total XP is zero (only true for SoC bosses?), skip following:
			-Start building XP gain string; "Earned "
			-Append XP per party member to the string
			-Append " XP" to the string
			-Print to top box ($6FDFC followed by $6EB90)
	$02: If A button is pressed (or no XP was granted), continue; else end immediately and try again
		-Load BattleMem+$5358 (total Gil reward); if zero set Routine Index to 3 and exit
		-Load Variable Memory pointer; advance to +$B94 (Gil total)
		-Branch to $07F11C; add gil reward to gil count, capping at 999,999G
		-Construct string for displaying "Obtained ___ gil."
		-Set Routine index 3, SomeMem +$14 to 00 (for levelups), and exit
	$03: If SomeMem+$14 (PC to level up) is 0x04, set Routine Index to 7 and exit
		-Handle level up for each PC; if PC leveled up, set Routine Index to 4, SomeMem +$10 to 0, and exit
		-Else, increment "PC to check for level" index and exit
	$04: Invoked when a PC has leveled up; for printing all of their levelup-related messages
		-Branch to $782F0
			-If A not pressed, exit immediately
			-Else, branch depending on how many times we've run (stored in SomeMem +$10)
			--First Run: get stats that leveled up into memory together, begin printing
			-Starting with "___ Leveled up!", on first runthrough
			-If no stats increased, return 1; else return 0x0
			--Second Run: Handle printing for HP gains
			---Third Run: Handle printing for MP gains
			---Fourth Run and On: Handle printing for main stat gains, one at a time
				-For the last stat to increase, return 0x1
		-If 1 was returned, go back to Routine Index 3; else exit
	$05:
		-Set BattleMem+$5354 to 0x1
		-Return 0x1 - exit battle
	$06:
		-Do nothing (unused)
	$07: Branch to $078514:
		-If SomeMem +$36 isn't 0xFF and A button not pressed, exit
		-Else, for up to 9 entries, load two bytes from BattleMem+$4B0C + entry*2
			-Item dropped+type for each monster!
			-Searches for any items dropped; if it finds one also searches rest of list to
			consolidate duplicates
		-With that, prints "Obtained ", plus item's name
		-Then attempts to put the item in your inventory
		-Repeat this routine once per item dropped
	-Normally, just exit
	-Once finished with all possible item drops, set Routine Index to 5 and exit

$078514 - At battle end, handles item drops - both printing text and adding to inventory
	-Runs at least once, and once per item dropped

$078614 - Run when a battle is lost (Game Over)

$078848 - Run at start of battle
	-At SomeMem+$09 store four 0xFF's (one for each PC), then 0x0000
	-Load VarMem+$BA0 (Config settings);
	store state of bit 1 (Cursor Memory vs Default) to SomeMem+$08

$07888C - Run at start of battle
	-Copy bytes from $22A820-$22A842 to stack
	-Does some stuff with first party member' battle data

$078B50 - Run whenever a unit is about to act, and at end of a round
	-From memory loads order number of unit to act next
		-If all unit slots have been processed, return 0x0 and exit
	-Uses that number to find unit ID of unit to act next; checks if they can act
		-If not, move to the next unit in line
	-Branch to $797F8 - handles targeting, retargets if needed
	-Sets this unit as the active (+$2880) unit
	-Stores their chosen action type to memory
	-Update all PC battle stats, then all monster battle stats
	-Zero out BattleMem+$51E0 structs (detail what happens to each unit from an action)
	-Update monster listing, party members' HP/MP display
	-Branch to $6EA10, return 0x1

$078C20 - Run continuously when a physical attack is underway;
	-Splits to different code depending on memory value
	$00 - Branch to $7B18C - physical attack hit/damage calcs!!
		-Then branch to $6D4B4 - long routine to do with attack effect structs,
		location of attacker, PC sprite animation, loading animation ID for attacker
		-Branch to $7D5F8
		-Branch to $71458 (phys. attack animation setup)
		-Branch to $72AC8
		-Set routine index to $01
	$01 - Waiting for animation to finish
		-Branch to $78E48; if does not return 0xFF, exit
			-Playing out the attack animation
		-Else, set routine index to $02
		-Copy animation params, redraw status effect bubbles
		-Branch to $79764 (printing damage/miss numbers for all targets affected by this attack)
		-Then set routine index to $03? Only for PC attackers

	$03 - Branch to $7952C; if returns 0x0, exit (give time for damage numbers to bounce, display for a little while)
		-Else:
		-Branch to $7C574 (checks if damage from attack kills target, among other things)
		-Branch to $71BE4 (clear damage/healing/miss numbers from screen)
		-Branch to $7C880 (Handle death flags/SFX, XP/Gil/Item drops, Bestiary count for any slain monsters)
		-Do weirdness with BattleMem+$4B90, +$450 structs
		-Then set routine index to $04
	$04 - If any monsters are still undergoing death animations, skip to end
		-Once all done, set attacking PC to walk back to the line; set routine index to $05
	$05 - While the given PC is still animating, just skip to end
		-Once finished, store their unit ID*96 to BattleMem+$4CCC
		-Then run the PC Pose Determination routines
		-Branch to $7C7E0 (check if PCs/Monsters are all dead)
		-Return 0x1 and exit; this routine is done with



$079928 - For a given (monster) unit, loads their monster ID; from there loads AI byte;
	From there loads pointer to AI definition and sets monsters' action to 0x8, Casting.
	Loads monster's position in their spell queue (from SomeMem+$20 + unitID*4)
	Loads the spell in that position; if 0xFF, restart from first spell
	Store this spell ID to monster's battle data
	Load spell's targeting byte from ROM; depending on targeting type, handle targeting
	(eg self-target? Store own ID); anyway store target ID to battle data +$3A

$079A30 - As above, but for monster abilities
	-Spell ID is added to 0x41 before being stored; otherwise workings are much the same

0x79B3C - Monster action selection calcs; run at the start of a round
	-See Battle (Mechanics) for details

$079E28 - Run constantly when a unit is acting
	-Load SomeMem+$17, action type of currently active PC
	$00: Branch to $78C20 (handles Attack); once that's done exit permanently
	$01: Branch to $79EE8 (handles spell casting); once that's done exit permanently
	$02: Branch to $7A9CC (handles Item usage); once that's done, exit permanently
	$03: Exit (Equip - dummy)
	$04: branch to $7ACEC (handles Flee); once that's done, exit permanently
	$05,$06: Exit
	$07: Monster physical attack
	$08: Monster spellcasting
	$09: Monster Fleeing; calls $7B054

$079EE8 - Run when a PC is casting
	-Check if PC is alive; if not return 0x1 and exit now
	-Else load ID of spell being cast; with that branch to $7CE48 (is spell White magic or not?)
	-Now branch depending on memory value (someMem+$16)
	
	$00: Get spell's name text; print to top bar
		-Set caster's animation to 0x2 (walking forward probably)
		-Get spell's MP cost and subtract from user's MP
		-Set routine index to $01
	$01: Call $72B00 to check if walking animation is done
		-When it is, call $72AC8 (clear all units' "animation going on" bytes in anim structs?)
		-If spell ID was a White Magic one: play SFX 0xA4 and use casting effect anim 1B (+$4ABF)
		-Black magic uses SFX 0xA3 and casting effect anim 1A (+$4ABE)
		-Handle the above (including setting coords for the effect), then redraw HP/MP/monster names
		-Set routine index to $02
	$02: Wait for caster to finish animating (for casting effect to finish?)
		-At that time, branch to $6EA10 w/ input 0x5 (???)
		-Then clear spell casting effect's animating byte - different depending on if was BM or WM effect
		-Then set PC to animation 0x0, neutral; also set sprite ID to 0x0
		-Set routine index to $03
	$03: Get spell's animation index; stores to r4
		-Branch to $7B568: Spell hit/damage calculations!!
		-Branch to $72A88
		-Store 0xFF to caster's action byte: action is finished
		-Get target/caster ID, spell anim ID and call $1E2FC: weapon/spell animation handler
		-Set routine index to $04
	$04: Branch to $1F1A4, animation chunk storage routine
		-Then check if anim ID is 0x00 (anim is finished); if not exit and repeat
		-Once anim is finished playing: branch to $71B94 (anim params copying)
		-Branch to $7BE2C - spell effects calculations!
		-Branch to $7C574 - check if spell killed targets
		-Branch to $79764 - print damage/healing/miss for all targets
		-Branch to $718F4,$719AC - redraw status effect bubbles, Blink/Invis effects
		-Set routine index to $05
	$05: Call $7952C, giving time for damage/miss numbers to animate
		-If not finished, exit; else continue:
		-Branch to $71BE4 - clear damage/miss/healing numbers from screen
		-Branch to $7C880 - handle death flags/effects, gil/xp, Bestiary for any slain monsters
		-Set routine index to $06
	$06: Call $72A50 to check if any monsters are in death animations; if so exit
		-If not, set casting PC to animation 0x5, walking right
		-Set routine index to $07
	$07: Stall until caster has finished walking animation
		-Once done, again set caster's action to 0xFF
		-Reset PC's pose w/ $70028, $70128
		-Call $7C7E0 to check if there are any monsters left
		-At any rate, set routine index to $00, return 0x1 and exit: we're done!

$07A45C -Run during the end of a round
	-Branches based on memory value (routine index); starts at $00, goes up to $14
	$00: Branch to $727EC to reset all units' action effect struct
		-Branch to $7A314 (checks for Regenerating monsters, Angel Ring and calcs)
		-If nobody is regenerating, set routine index to $0A
		-Otherwise set it to $01
	$01: Handle healing numbers printing
		-Branch to $71B94 (anim params copying)
		-Branch to $79764 (print healing numbers)
		-Set routine index to $02
	$02: Handle healing numbers animating; until they finish just do that and end
		-Once done, clear from screen and update HP/MP/monster names
		-Set routine index to $0A
	($03 - $09: Nothing)
	$0A: Again, initialize all units' action effect struct
		-Branch to 7A3CC (running Poison calcs for PCs)
		-If no PCs are poisoned, set routine index to $14 and exit
		-Else set to $0B and exit
	$0B: Print damage numbers from poison
		-Set routine index to $0C and quit
	$0C: Animate numbers until timer runs out;
		-Once it does, clear damage numbers, set routine index to $14 and exit
	($0D - $13: Nothing)
	$14: Update HP/MP/monster name displays
		-Run pose determination routine for all PCs; set routine index to $00
		-Check if the battle is over now, and anyway return 0x1 and exit

$07A5C4 - Physical attack processing for monsters
	-Input is SomeMem Pointer, active unit ID
	-Store unit ID to SomeMem+$50
	-Store battle data pointer to SomeMem+$48
	-Store target ID to SomeMem+$51, and target battle data to SomeMem+$4C
	-Load SomeMem+$16 - routine index:

	$00: Check if acting unit is Confused
		-If so, roll random number 0-99
		-And if result is 0-19, flip monster sprite, remove Confusion,
		and set routine index to $06
		-In any other case, continue; branch to $72AC8
		-Set routine index to $01; set BattleMem+$535A (monster palette cycle timer) to 0x00
	$01: Call $070B20, palette cycler for active monster; while it returns 0x1 just exit
		-Once 0x0 is returned, call $07B18C - physical attack calcs
		-Get pointers to SomeMem+$1B, +$1C (will hold attack/shield block anim IDs)
		-Branch to $6D4B4 (physical attack animation prep)
		-Branch to $71458 (phys anim prep 2)
		-Set routine index to $02; set SomeMem+$1A to 0x0
	$02: Branch to $78E48 (phys attack anim processing)
		-While anim is ongoing, just exit
		-Once it's done (returns 0xFF), set routine index to $03
	$03: 
		-Branch to $71B94, and to $7C574 (check if target was killed)
		-Redraw status ailment bubbles
		-Print damage/"Miss"
		-Set routine index to $04
	$04:
		-Handle damage/miss animation; until it's finished just exit after
		-Once done, clear them from screen (71BE4)
		-Call $07C880 - handle death of any monsters (in case our monster was Confused...)
		-Set routine index to $05
	$05: While monsters are going through death animations, do nothing
		-Once done, set routine index to $00
		-Call $7C7E0 to check if battle is over now; anyway return 0x1 and exit
	$06: Handling a monster which just snapped out of Confusion
		-Decrement SomeMem+$18; if nonzero, exit, but once it reaches zero return 0x1, clear routine index and exit
		-Give some extra time for the Confusion curing to register

$07A7F8 - Spell/Ability processing for monsters
	

$07A9CC -Run during an Item use action
	For currently acting PC, load entry in item use struct
	-This routine also does different things depending on memory value (routine index)
	$00: To start with, load used item's name text and print it on the top bar
	$01: Next, let PC animate walking forward, then change animation to 'raise hands'
	$02: Let PC animate the hand-raising; once finished, change animation again;
		-Set 'current action' to 0xFF
		-If item's spell is 0x00/Nothing, print "No effect." and swap to $08
		-Otherwise, call $6EA10 and set routine index to $03
	$03: Get item's spell's animation ID from ROM
		-Call spell hit/damage determination
		-Get IDs of user/target from SomeMem; call $1E2FC to start spell animation
		-Set routine index to $04
	$04: Call $1F1A4
		-Wait for spell animation to finish; once done, call $71B94
		-Then call $7BE2C, spell effects handling
		-Call $7C574 to check if targets killed
		-Print damage/healing/miss stuff; redraw status ailment bubbles, Invis/Blink effects
		-Set routine index to $05
	$05: Animate damage/healing/miss; once done clear from screen and set routine index to $06
	$06: Wait for any dying monsters to complete death animations; then set use to walk back to the line
		-Set routine index to $07
	$07: Delay until PC has finished walking back animation
		-Once delay is finished, reset PC's sprite, deplete uses of item by one
			-If it's an item, and not a weapon/armor, of course
		-Return 0x1, finishing this routine's use
	$08: Delay to let "No effect." message have time to be read
		-Once delay is over, redraw status bubbles/Invis effects, set PC to walk back
		-Swap to $07

$07ACEC - Routine for Run processing
	-See Battle Mechanics for more

$07B054 - Called when a monster is fleeing on its turn
	Also uses routine indices
	Given runner's unit ID, load monster ID from battle data; store unitID - 4 to r7
	$00: Clear stuff from all PC sprites
		-Store 0x0 to BattleMem+$535A (palette cycling timer)
		-Set routine index to $01
	$01: Cycle monster's palette
		-Once that's done, clear out some space in the stack
		-Start building the fleeing message: "The "
		-Load the monster's name and append that
		-Finally append " ran away." and print the completed message to the top bar
		-Set this monster's death flags (will play death animation)
		-Play sound 0x118 (presumably, monster flee sound)
		-Set routine index to $02; initialize a timer at 0x3C
	$02: Let death animation play out
		-Then, call $6EA10 w/ input 0x5
		-Redraw status ailment bubbles
		-Exit

$07C574 - Run after an action in battle:
	Goes through every possible unit in battle:
	  If target is killed by this attack, set HP to zero, status to KO; cancel any actions
	  Also applies healing - both to HP and MP
	Update monster names, party HP/MP display

$07C7E0 - Run after an action; checks if the battle is over
	-Counts number of living PCs; if all dead store 0x2 to BattleMem+$51CC and exit
	-Count number of living monsters; if at least one alive store 0x1 to +$51CC and exit
	-If all dead, check if this is the Chaos encounter; if so store 0x1 anyway
	-Otherwise, all monsters dead = store 0x3 to +$51CC

$07C880 - Run after an action
	-Loop through every possible monster, checking if they're existent and alive
	 -If not, set their death flags; index to monster data table at $22A880; add XP and Gil to total
	 -Then, branch to $7CAC0: roll for item drop
	 -Then branch on encounter ID type (what monster death sound effect to play?)
		-For regular encounters, play sound effect 0xFE, branch to $7ED1C (increment Slain count)

$07CAC0 - For given monster ID and unit ID, load item drop type/ID/chance
	-If chance is 0%, exit now; else roll for drop chance
	-If drop chance rolled a success, put item in BattleMem+$4B0C drop listing
		7CB3F

$07CE48 - If given spell ID is 0x20 or below (White Magic), return 0x0; else return 0x1

$07CE5C - Unused routine?
	-Given a monster's unit ID, runs morale checks; returns 0x1 or 0x0 based on results
	-Identical to the normal formula though

$07CEE4 - Alternate battle end routine - lacks Chaos check
	-If all PCs are dead, return 0x2
	-If all monsters are dead, return 0x1
	-Otherwise, return 0x0

$07CF40 - Unused routine that caps current MP at max MP
$07CFA0 - Unused routine that applies healing or damage to a unit's HP; returns 0x1 if unit survived, 0x0 if not

$07D014 - Run at start of every action - if every unit has acted or one side is victorious, round must end
	-Reads BattleMem+$51CC (battle end indicator); if nonzero return 1
	-Read SomeMem+$15 (turn order # of acting unit?); if greater than 0xC return 0x0
	-Else return 0x1

$07EA14 - Checking if an item dropped by monster(s) can fit in your inventory; also used for chests
  $07EA5A - For monster item drops; finds slot to place item(s) in by checking against item type/ID
  $07EA8A - Checking item's quantity in inventory; if will be larger than 99 after adding, set stack size to 99

$07F15C - Loads pointer contained in $02000584 (varMem)


Maximum temporary boost to stats (from Temper,etc):
0x7C062,68	Max DEF boost
92,96		Max ATK boost (Saber)
C0,C6		Max ATK boost 
0x7C0DC, 7C0EC: Maximum temporary Evade penalty
0x7C12E,36:	Max EVA boost